﻿using System;

namespace GeneticAlgorithm
{
    public class Item
    {
        public string Name { get; set; }
        public int Price { get; set; }
        public int Count { get; set; }
        public int Margin { get; set; }
        public int Category { get; set; }

        public override bool Equals(Object obj)
        {
            var item = obj as Item;
            if (item != null)
            {
                return Count == item.Count ||
                    Margin == item.Margin ||
                       Name == item.Name ||
                       Price == item.Price
                    ;
            }
            else
            {
                return false;
            }
        }
    }

    

}
